<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/7/11
  Time: 21:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <%--格式化标签
JSTL格式化标签用来格式化并输出文本、日期、时间、数字。
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>--%>
    <title>Title</title>
</head>
<body>
<%--直接用EL表达式取出时间--%>
    ${date}

<hr/>
<%--value里的EL表达式的值是   req.setAttribute("date",new Date());
   的key --%>
<fmt:formatDate value="${date}" pattern="yyyy-MM-dd"/>
<hr/>
<fmt:formatNumber value="${balance}" type="currency"/>
</body>
</html>
